import at.guigu.pojo.Brand;
import at.guigu.service.BrandService;
import org.junit.Test;

public class AddOne {
    //1 创建一个私有的BrandService对象
    private BrandService brandService = new BrandService();

    // 基础添加
    @Test
    public void add() {
        //接收前端传回的多个参数
        String companyName = "波导";
        String brandName = "波导手机";
        String description = "手机中的战斗机";
        int ordered = 100;
        int status = 1;

        //将参数封装到对象中
        Brand brand = new Brand();
        brand.setCompanyName(companyName);
        brand.setBrandName(brandName);
        brand.setDescription(description);
        brand.setOrdered(ordered);
        brand.setStatus(status);

        boolean f = brandService.add(brand);
        System.out.println(f);
    }
}
